home *** CD-ROM | disk | FTP | other *** search
/ 600 Games / 600games.iso / Classicos / bananamonkey.swf / scripts / frame_19 / PlaceObject2_342_231 / CLIPACTIONRECORD onClipEvent(enterFrame).as next >
Encoding:
Text File  |  2006-06-19  |  4.1 KB  |  188 lines

  1. onClipEvent(enterFrame){
  2.    if(_X <= 0)
  3.    {
  4.       _X = 10;
  5.    }
  6.    else if(_X >= 590)
  7.    {
  8.       _X = 580;
  9.    }
  10.    if(_root.amitavaplay == true)
  11.    {
  12.       if(Key.isDown(38) && waking == 1 && _Y > 50)
  13.       {
  14.          if(cach == 1)
  15.          {
  16.             rot += 1;
  17.             this._rotation = 0;
  18.             if(rot >= 5)
  19.             {
  20.                _Y = _Y - 70;
  21.                this.gotoAndStop(2);
  22.                waking = 0;
  23.             }
  24.             mov = 2;
  25.          }
  26.       }
  27.       else if(Key.isDown(40) && waking == 1 && _Y < 500)
  28.       {
  29.          if(cach == 1)
  30.          {
  31.             rot += 1;
  32.             this._rotation = 180;
  33.             if(rot >= 5)
  34.             {
  35.                _Y = _Y + 70;
  36.                this.gotoAndStop(2);
  37.                waking = 0;
  38.             }
  39.             mov = -2;
  40.          }
  41.       }
  42.       else if(Key.isDown(39) && waking == 1 && _X < 580)
  43.       {
  44.          if(cach == 1)
  45.          {
  46.             rot += 1;
  47.             this._rotation = 90;
  48.             if(rot >= 5)
  49.             {
  50.                _X = _X + 70;
  51.                this.gotoAndStop(2);
  52.                waking = 0;
  53.             }
  54.             movx = -2;
  55.          }
  56.       }
  57.       else if(Key.isDown(37) && waking == 1 && _X > 50)
  58.       {
  59.          if(cach == 1)
  60.          {
  61.             rot += 1;
  62.             this._rotation = -90;
  63.             if(rot >= 5)
  64.             {
  65.                _X = _X - 70;
  66.                this.gotoAndStop(3);
  67.                waking = 0;
  68.             }
  69.             movx = 2;
  70.          }
  71.       }
  72.       if(this.hitTest(_root.banana))
  73.       {
  74.          if(cach == 1)
  75.          {
  76.             if(food <= 12)
  77.             {
  78.                food += 1;
  79.                _root.banana._visible = false;
  80.                this.gotoAndStop(4);
  81.                cach = 0;
  82.             }
  83.             if(food == 12)
  84.             {
  85.                if(lev == 1)
  86.                {
  87.                   if(_root.amitavalife > 0)
  88.                   {
  89.                      _root.wel.gotoAndPlay(2);
  90.                      lev = 0;
  91.                   }
  92.                }
  93.             }
  94.          }
  95.       }
  96.       if(this.body.hitTest(_root.b1.br))
  97.       {
  98.          _X = _X - 3;
  99.          Jump = false;
  100.       }
  101.       else if(this.body.hitTest(_root.b2.br))
  102.       {
  103.          _X = _X - 3;
  104.          Jump = false;
  105.       }
  106.       else if(this.body.hitTest(_root.b3.br))
  107.       {
  108.          _X = _X - 3;
  109.          Jump = false;
  110.       }
  111.       else if(this.body.hitTest(_root.b4.br))
  112.       {
  113.          Jump = false;
  114.       }
  115.       else if(this.body.hitTest(_root.b5.br))
  116.       {
  117.          _X = _X - 3;
  118.          Jump = false;
  119.       }
  120.       else if(this.hitTest(_root.b6.br))
  121.       {
  122.          _X = _X - 3;
  123.          Jump = false;
  124.       }
  125.       else if(this.hitTest(_root.b7.br))
  126.       {
  127.          _X = _X - 3;
  128.          Jump = false;
  129.       }
  130.       else if(this.hitTest(_root.b8.br))
  131.       {
  132.          _X = _X + 3;
  133.          Jump = false;
  134.       }
  135.       else if(this.hitTest(_root.b9.br))
  136.       {
  137.          _X = _X + 3;
  138.          Jump = false;
  139.       }
  140.       else if(this.hitTest(_root.b10.br))
  141.       {
  142.          _X = _X + 3;
  143.          Jump = false;
  144.       }
  145.       else if(this.hitTest(_root.b11.br))
  146.       {
  147.          _X = _X + 3;
  148.          Jump = false;
  149.       }
  150.       else if(this.hitTest(_root.b12.br))
  151.       {
  152.          _X = _X + 3;
  153.          Jump = false;
  154.       }
  155.       else
  156.       {
  157.          Jump = true;
  158.       }
  159.       if(this.body.hitTest(_root.wat1) && Jump == true)
  160.       {
  161.          if(ml == 1)
  162.          {
  163.             _root.monkey.gotoAndStop(5);
  164.             _root.monkey.waking = 0;
  165.             ml = 0;
  166.          }
  167.       }
  168.       if(this.body.hitTest(_root.wat2) && Jump == true)
  169.       {
  170.          if(ml == 1)
  171.          {
  172.             _root.monkey.gotoAndStop(5);
  173.             _root.monkey.waking = 0;
  174.             ml = 0;
  175.          }
  176.       }
  177.       if(this.body.hitTest(_root.wat3) && Jump == true)
  178.       {
  179.          if(ml == 1)
  180.          {
  181.             _root.monkey.gotoAndStop(5);
  182.             _root.monkey.waking = 0;
  183.             ml = 0;
  184.          }
  185.       }
  186.    }
  187. }
  188.